class Student:
    # 类变量，所有实例共享
    totalScore  = 0

    def __init__(self, name, score):
        # 实例变量
        self.name = name
        self.score = score
        Student.totalScore += score
    
    def sayName(self):
        print(self.name)
    
    def setScore(self, score):
        self.score = score

s1 = Student('a', 80)
s2 = Student('b', 90)

print(Student.totalScore)
print(s1.name, s1.score)

s1.sayName()
s1.setScore(85)
print(s1.score)